package com.example.demo.controller;

import com.example.demo.entity.Reservation;
import com.example.demo.service.ReservationService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * (Reservation)表控制层
 *
 * @author makejava
 * @since 2020-12-08 14:12:23
 */
@RestController
@RequestMapping("reservation")
public class ReservationController {
    /**
     * 服务对象
     */
    @Resource
    private ReservationService reservationService;

    /**
     * 通过主键查询单条数据
     *
     * @param id 主键
     * @return 单条数据
     */
    @GetMapping("selectOne")
    public Reservation selectOne(Integer id) {
        return this.reservationService.queryById(id);
    }

}